 import React from 'react'
 // ===================================================================== Temp
 import SubmitForm from '#cpt/temp/SubmitForm'
 // ===================================================================== global declare
 const { $fn, $Lazy } = window
 // ===================================================================== Lazy
const Page		= $Lazy.load (()=>import('#tp/page/page-container'))
const $cache 	= $Lazy.file (()=>import('#private/cache-api'))
 // ===================================================================== component
 class Index extends React.Component{
 	state = {
 		formData : [
 			{ label: '岗位',				name: 'project_id', 			half:true,		required:true, 	type:'select' },
			{ label: '仅下发无结果',		name: 'is_checked', 			half:true,	 	type:'checkbox' },
 		]
 	}
 	
 	componentDidMount(){ this.getSelect() }
 	
	// 获取下拉数据
	getSelect = async () => {
		const { formData } = this.state
		$cache.then( async f => {
			// 岗位
			$fn.setRow(formData, 'project_id', await f.getCache({ api: 'gang_wei' } ) )
			//
			this.setState({ formData })
		})
	}
	
 	render(){
 		return (
 			<>
 				<Page title='手动下发'>
 					<div className='ex pt20 mlr20 fv'>
						{ SubmitForm.call(this,{ labelWidth:'s8', contentClassName:'pr5',api: 'ts-report-card/projectToDevice', hideButton:false, noEsc:true, enter:true, scroll:true, btnSize:'large', okText:'下发'}) }
 					</div>
 				</Page>
 			</>
 		)
 	}
 }
 
 export default Index